package com.tree.shardingjdbc.demo.config;

import com.tree.shardingjdbc.demo.entity.UserEntity;
import com.zaxxer.hikari.HikariDataSource;
import io.shardingsphere.api.config.MasterSlaveRuleConfiguration;
import io.shardingsphere.api.config.ShardingRuleConfiguration;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName com.tree.shardingjdbc.demo.config
 * Description: <类功能描述>. <br>
 * <p>
 * 存放数据源
 * </p>
 * @Author tree
 * @Date 2019-06-02 23:31
 * @Version 1.0
 */
@Data
@ConfigurationProperties(prefix = "sharding.jdbc")
public class ShardingMasterSlaveConfig {
    private Map<String, HikariDataSource> dataSources = new HashMap<>();
    private ShardingRuleConfiguration shardingRuleConfiguration;
}
